class Http {
    static baseUrl = `http://47.108.197.28:3000`;
    static request(url) {
        return new Promise((resolve, reject) => {
            $.ajax({
                url: this.baseUrl + url,
                success: res => {
                    resolve(res);
                },
                error: err => {
                    reject(err);
                }
            })
        })
    }
}

class MusicHttp extends Http {
    static getHotMusicHttp() {
        return this.request("/top/playlist/highquality")
    }
    static getNewMusicHttp() {
        return this.request("/album/newest")
    }
    static getDjHttp(){
        return this.request("/personalized/dsprogram")
    }
}

// module.exports = MusicHttp; 